package com.riaevolution.components
{
	import flash.events.Event;
	
	import mx.controls.Alert;
	import mx.controls.Button;
	import mx.controls.ButtonBar;
	import mx.core.UIComponent;
	import mx.effects.Move;
	import mx.effects.Parallel;
	import mx.effects.Resize;
	import mx.events.DragEvent;
	import mx.events.ItemClickEvent;
	import mx.events.ModuleEvent;
	import mx.managers.DragManager;
	import mx.managers.PopUpManager;
	import mx.modules.IModuleInfo;
	import mx.modules.ModuleManager;
	
	public class TrayBar extends ButtonBar
	{
		public var recentIndex:int;
		private var __holder:UIComponent;
		private var minfo:IModuleInfo;
		public function TrayBar()
		{
			//TODO: implement function
			super();
		}
		public function addButtonsListener(type:String,callback:Function):void {
			var list:Array = this.getChildren();
			for(var t:int=0; t<list.length; t++) {
				var ui:UIComponent = list[t] as UIComponent;
				ui.addEventListener(type,callback);
			}
		}
		public function removeButtonsListener(type:String,callback:Function):void {
			var list:Array = this.getChildren();
			for(var t:int=0; t<list.length; t++) {
				var ui:UIComponent = list[t] as UIComponent;
				if(ui.hasEventListener(type)) {
					ui.removeEventListener(type,callback);
				}
			}
		}
	}
}